package tongwentongshu.com.app.network;


import java.util.Map;

import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.POST;
import rx.Observable;
import tongwentongshu.com.app.bean.AppItem;
import tongwentongshu.com.app.bean.BookDetailsBean;
import tongwentongshu.com.app.bean.BookListBean;
import tongwentongshu.com.app.bean.BookSearchBean;
import tongwentongshu.com.app.bean.BookTypeBean;
import tongwentongshu.com.app.bean.CancelBean;
import tongwentongshu.com.app.bean.DepositBean;
import tongwentongshu.com.app.bean.DouBean;
import tongwentongshu.com.app.bean.FeebBackBean;
import tongwentongshu.com.app.bean.HelpBean;
import tongwentongshu.com.app.bean.LoginUser;
import tongwentongshu.com.app.bean.MessageBean;
import tongwentongshu.com.app.bean.MessageReadBean;
import tongwentongshu.com.app.bean.MyFollowBean;
import tongwentongshu.com.app.bean.MyReadingBean;
import tongwentongshu.com.app.bean.MyShareBean;
import tongwentongshu.com.app.bean.PersonalBean;
import tongwentongshu.com.app.bean.PioBean;
import tongwentongshu.com.app.bean.RqcordBook;
import tongwentongshu.com.app.bean.MyCollectionBean;
import tongwentongshu.com.app.bean.ShareBean;
import tongwentongshu.com.app.bean.ShareDetailsBean;
import tongwentongshu.com.app.bean.SignBean;
import tongwentongshu.com.app.bean.VersionBean;
import tongwentongshu.com.app.bean.WalletBean;
import tongwentongshu.com.app.bean.WechatBean;
import tongwentongshu.com.app.bean.WithBean;
import tongwentongshu.com.app.bean.WithInfoBean;

/**
 * 同文同书接口
 * 1.导入retrofit的依赖库
 */
public interface NetworkApi {
    @FormUrlEncoded
    @POST("index.php?s=/Api/Book/rqcordBook")
    Observable<RqcordBook> rqcordBook(@FieldMap Map<String, String> map);

    /**
     * 获得首页图书数据
     * http://www.tongwentongshu.cn/index.php?s=/Api/Bookmap/indexmap
     *
     * @param map
     * @return
     */
    @FormUrlEncoded
    @POST("index.php?s=/Api/Bookmap/indexmap")
    Observable<PioBean> PioCall(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("index.php?s=/Api/Bookmap/indexmapbook")
    Observable<BookListBean> BookListCall(@FieldMap Map<String, String> map);

    /**
     * 提交分享图书
     *
     * @param map
     * @return
     */
    @FormUrlEncoded
    @POST("index.php?s=/Api/Book/releaseBook")
    Observable<ShareBean> ReleaseBookCall(@FieldMap Map<String, String> map);

    /**
     * 提交分享图书
     * http://www.tongwentongshu.cn/index.php?s=/Api/Book/booktypelist
     *
     * @param map
     * @return
     */
    @FormUrlEncoded
    @POST("index.php?s=/Api/Book/booktypelist")
    Observable<BookTypeBean> BookTypeListCall(@FieldMap Map<String, String> map);

    /**
     * 图书详情
     * http://www.tongwentongshu.cn/index.php?s=/Api/book/bookdetail/bookId/1
     *
     * @param map
     * @return
     */
    @FormUrlEncoded
    @POST("index.php?s=/Api/book/bookdetail")
    Observable<BookDetailsBean> BookdetailCall(@FieldMap Map<String, String> map);

    /**
     * 注册发送验证码
     *
     * @param map
     * @return
     */
    @FormUrlEncoded
    @POST("index.php?s=/Api/Login/sendregcode")
    Observable<AppItem> SendRegCodeCall(@FieldMap Map<String, String> map);

    /**
     * 注册
     *
     * @param map
     * @return
     */
    @FormUrlEncoded
    @POST("index.php?s=/Api/Login/Registered")
    Observable<AppItem> RegisteredCall(@FieldMap Map<String, String> map);

    /**
     * 实名认证
     *
     * @param map
     * @return
     */
    @FormUrlEncoded
    @POST("index.php?s=/Api/User/checkname")
    Observable<AppItem> CheckNameCall(@FieldMap Map<String, String> map);

    /**
     * 忘记密码发送验证码
     *
     * @param map
     * @return
     */
    @FormUrlEncoded
    @POST("index.php?s=/Api/Login/sendresetcode")
    Observable<AppItem> SendCodCall(@FieldMap Map<String, String> map);

    /**
     * 5.4忘记密码/重置密码
     *
     * @param map
     * @return
     */
    @FormUrlEncoded
    @POST("index.php?s=/Api/Login/resetPwd")
    Observable<AppItem> ResetPwdCall(@FieldMap Map<String, String> map);

    /**
     * 修改密码
     *
     * @param map
     * @return
     */
    @FormUrlEncoded
    @POST("index.php?s=/Api/Login/modifyPwd")
    Observable<AppItem> ModifyPwdCall(@FieldMap Map<String, String> map);

    /**
     * 5.4忘记密码/重置密码
     *
     * @param map
     * @return
     */
    @FormUrlEncoded
    @POST("index.php?s=/Api/Setting/editperson")
    Observable<AppItem> EditPersonCall(@FieldMap Map<String, String> map);

    /**
     * 登陆
     * http://www.tongwentongshu.cn/index.php?s=/Api/Login/Login/mobile/15712957261/password/123456/phoneType/0
     *
     * @param map
     * @return
     */
    @FormUrlEncoded
    @POST("index.php?s=/Api/Login/Login")
    Observable<LoginUser> LoginCall(@FieldMap Map<String, String> map);

    /**
     * 我的读书列表
     * http://www.tongwentongshu.cn/index.php?s=/Api/Book/myreading/token/4c65385d4e73724b933d9631212215c8639
     *
     * @param map
     * @return
     */
    @FormUrlEncoded
    @POST("index.php?s=/Api/Book/myreading")
    Observable<MyReadingBean> MyReadingCall(@FieldMap Map<String, String> map);

    /**
     * 我的收藏列表
     * http://www.tongwentongshu.cn/index.php?s=/Api/Book/mycollection/token/4c65385d4e73724b933d9631212215c8639
     *
     * @param map
     * @return
     */
    @FormUrlEncoded
    @POST("index.php?s=/Api/Book/mycollection")
    Observable<MyCollectionBean> MyCollectionCall(@FieldMap Map<String, String> map);

    /**
     * 我的分享列表
     * http://www.tongwentongshu.cn/index.php?s=/Api/Book/myShare/token/4c65385d4e73724b933d9631212215c8639
     *
     * @param map
     * @return
     */
    @FormUrlEncoded
    @POST("index.php?s=/Api/Book/myShare")
    Observable<MyShareBean> MyShareCall(@FieldMap Map<String, String> map);

    /**
     * 我的关注列表
     * http://www.tongwentongshu.cn/index.php?s=/Api/User/myfollow/token/4c65385d4e73724b933d55546531212215c8639
     *
     * @param map
     * @return
     */
    @FormUrlEncoded
    @POST("index.php?s=/Api/User/myfollow")
    Observable<MyFollowBean> MyFollowCall(@FieldMap Map<String, String> map);

    /**
     * 个人首页信息
     * http://www.tongwentongshu.cn/index.php?s=/Api/Setting/personshow/id/18
     *
     * @param map
     * @return
     */
    @FormUrlEncoded
    @POST("index.php?s=/Api/Setting/personshow")
    Observable<PersonalBean> PersonalShowCall(@FieldMap Map<String, String> map);

    /**
     * 我的分享详情
     * http://www.tongwentongshu.cn/index.php?s=/Api/Book/mysharedetail/token/cfd5f77aa068acaef114f047476d200b/bookid/110
     *
     * @param map
     * @return
     */
    @FormUrlEncoded
    @POST("index.php?s=/Api/Book/mysharedetail")
    Observable<ShareDetailsBean> MyShareDetailCall(@FieldMap Map<String, String> map);

    /**
     * 操作图书状态
     * http://www.tongwentongshu.cn/index.php?s=/Api/Book/operationbook/token/cfd5f77aa068acaef114f047476d200b/bookid/110
     *
     * @param map
     * @return
     */
    @FormUrlEncoded
    @POST("index.php?s=/Api/Book/operationbook")
    Observable<ShareDetailsBean> OperationBookCall(@FieldMap Map<String, String> map);

    /**
     * 签到
     * http://www.tongwentongshu.cn/index.php?s=/Api/User/signin/token/cfd5f77aa068acaef114f047476d200b
     *
     * @param map
     * @return
     */
    @FormUrlEncoded
    @POST("index.php?s=/Api/User/signin")
    Observable<SignBean> SigninCall(@FieldMap Map<String, String> map);

    /**
     * 我的钱包
     * http://www.tongwentongshu.cn/index.php?s=/Api/User/wallet/token/cfd5f77aa068acaef114f047476d200b
     *
     * @param map
     * @return
     */
    @FormUrlEncoded
    @POST("index.php?s=/Api/User/wallet")
    Observable<WalletBean> WalletCall(@FieldMap Map<String, String> map);

    /**
     * 书豆详情
     * http://www.tongwentongshu.cn/index.php?s=/Api/User/doudouDetail/token/cfd5f77aa068acaef114f047476d200b
     *
     * @param map
     * @return
     */
    @FormUrlEncoded
    @POST("index.php?s=/Api/User/doudouDetail")
    Observable<DouBean> DoudouDetailCall(@FieldMap Map<String, String> map);

    /**
     * 押金详情
     * http://www.tongwentongshu.cn/index.php?s=/Api/User/moneydetail/token/cfd5f77aa068acaef114f047476d200b
     *
     * @param map
     * @return
     */
    @FormUrlEncoded
    @POST("index.php?s=/Api/User/moneydetail")
    Observable<DepositBean> MoneyDetailCall(@FieldMap Map<String, String> map);

    /**
     * 押金详情
     * http://www.tongwentongshu.cn/index.php?s=/Api/User/backmoney/token/cfd5f77aa068acaef114f047476d200b
     *
     * @param map
     * @return
     */
    @FormUrlEncoded
    @POST("index.php?s=/Api/User/backmoney")
    Observable<AppItem> BackMoneyCall(@FieldMap Map<String, String> map);

    /**
     * 收藏
     * http://www.tongwentongshu.cn/index.php?s=/Api/Book/addmycollection/token/cfd5f77aa068acaef114f047476d200b
     *
     * @param map
     * @return
     */
    @FormUrlEncoded
    @POST("index.php?s=/Api/Book/addmycollection")
    Observable<AppItem> AddmyCollectionCall(@FieldMap Map<String, String> map);

    /**
     * 关注
     * http://www.tongwentongshu.cn/index.php?s=/Api/User/moneydetail/token/cfd5f77aa068acaef114f047476d200b
     *
     * @param map
     * @return
     */
    @FormUrlEncoded
    @POST("index.php?s=/Api/User/addmyfollow")
    Observable<AppItem> AddmyFollowCall(@FieldMap Map<String, String> map);

    /**
     * 重新分享
     * http://www.tongwentongshu.cn/index.php?s=/Api/User/moneydetail/token/cfd5f77aa068acaef114f047476d200b
     *
     * @param map
     * @return
     */
    @FormUrlEncoded
    @POST("index.php?s=/Api/Book/againreleasebook")
    Observable<AppItem> AgainReleaseBookCall(@FieldMap Map<String, String> map);

    /**
     * 收藏
     * http://www.tongwentongshu.cn/index.php?s=/Api/User/myproblemhelp
     *
     * @param map
     * @return
     */
    @FormUrlEncoded
    @POST("index.php?s=/Api/User/myproblemhelp")
    Observable<HelpBean> MyProblemHelpCall(@FieldMap Map<String, String> map);

    /**
     * 支付
     * http://www.tongwentongshu.cn/index.php?s=/Api/User/userpay/type/1/order_money/1/token/
     *
     * @param map
     * @return
     */
    @FormUrlEncoded
    @POST("index.php?s=/Api/User/userpay")
    Observable<WechatBean> UserPayCall(@FieldMap Map<String, String> map);

    /**
     * 未读消息
     * http://www.tongwentongshu.cn/index.php?s=/Api/Message/messageread/token/
     *
     * @param map
     * @return
     */
    @FormUrlEncoded
    @POST("index.php?s=/Api/Message/messageread")
    Observable<MessageReadBean> MessageReadCall(@FieldMap Map<String, String> map);

    /**
     * 消息列表
     * http://www.tongwentongshu.cn/index.php?s=/Api/Message/messagelist/message_type/1/token/
     *
     * @param map
     * @return
     */
    @FormUrlEncoded
    @POST("index.php?s=/Api/Message/messagelist")
    Observable<MessageBean> MessageListCall(@FieldMap Map<String, String> map);

    /**
     * 搜索
     * http://www.tongwentongshu.cn/index.php?s=/Api/Book/booksearch/longitude//latitude//bookname/
     *
     * @param map
     * @return
     */
    @FormUrlEncoded
    @POST("index.php?s=/Api/Book/booksearch")
    Observable<BookSearchBean> BookSearchCall(@FieldMap Map<String, String> map);

    /**
     * 取消预约
     * http://www.tongwentongshu.cn/index.php?s=/Api/Book/canceltypelist
     *
     * @param map
     * @return
     */
    @FormUrlEncoded
    @POST("index.php?s=/Api/Book/canceltypelist")
    Observable<CancelBean> CancelTypelistCall(@FieldMap Map<String, String> map);

    /**
     * 版本更新
     * http://www.tongwentongshu.cn/index.php?s=/Api/User/version/type/1
     *
     * @param map
     * @return
     */
    @FormUrlEncoded
    @POST("index.php?s=/Api/User/version")
    Observable<VersionBean> VersionCall(@FieldMap Map<String, String> map);

    /**
     * 上传头像
     * http://www.tongwentongshu.cn/index.php?s=/Api/User/version/type/1
     *
     * @param map
     * @return
     */
    @FormUrlEncoded
    @POST("index.php?s=/Api/User/useravatar")
    Observable<VersionBean> UseravatarCall(@FieldMap Map<String, String> map);

    /**
     * 意见反馈类别
     * http://www.tongwentongshu.cn/index.php?s=/Api/Setting/suggesttype
     *
     * @param map
     * @return
     */
    @FormUrlEncoded
    @POST("index.php?s=/Api/Setting/suggesttype")
    Observable<FeebBackBean> SuggestTypeCall(@FieldMap Map<String, String> map);

    /**
     * t提交意见反馈
     * http://www.tongwentongshu.cn/index.php?s=/Api/Setting/suggesttype
     *
     * @param map
     * @return
     */
    @FormUrlEncoded
    @POST("index.php?s=/Api/Setting/suggestedit")
    Observable<AppItem> suggestEditCall(@FieldMap Map<String, String> map);

    /**
     * 未读变已读
     * http://www.tongwentongshu.cn/index.php?s=/Api/Message/updatemessage/messid/
     *
     * @param map
     * @return
     */
    @FormUrlEncoded
    @POST("index.php?s=/Api/Message/updatemessage")
    Observable<AppItem> UpdateMessageCall(@FieldMap Map<String, String> map);

    /**
     * 消息列表 已读 置顶
     * http://www.tongwentongshu.cn/index.php?s=/Api/Message/setallmessage
     *
     * @param map
     * @return
     */
    @FormUrlEncoded
    @POST("index.php?s=/Api/Message/setallmessage")
    Observable<AppItem> SetallmessageCall(@FieldMap Map<String, String> map);

    /**
     * 9.26提现详细信息
     * http://www.tongwentongshu.cn/index.php?s=/Api/User/doudouwithdrawalsinfo/token
     *
     * @param map
     * @return
     */
    @FormUrlEncoded
    @POST("index.php?s=/Api/User/doudouwithdrawalsinfo")
    Observable<WithInfoBean> WithdrawalsInfoCall(@FieldMap Map<String, String> map);

    /**
     * 9.26提现详细信息
     * http://www.tongwentongshu.cn/index.php?s=/Api/User/doudouwithdrawals/token
     *
     * @param map
     * @return
     */
    @FormUrlEncoded
    @POST("index.php?s=/Api/User/doudouwithdrawals")
    Observable<WithBean> WithdrawalsCall(@FieldMap Map<String, String> map);

}
